@import './GenerationCard.css';

/* 生成项目容器 */
.generation-item {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto 16px auto;
  padding: 20px;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: all 0.3s ease;
}

.generation-item:hover {
  /* 悬停效果已移除，保持简洁 */
}

/* 日期 */
.generation-date {
  color: #ffffff;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* 内容区域 */
.generation-content {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
}

/* 图片容器 */
.generation-image-container {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


/* 参数信息 */
.generation-info {
  flex: 1;
}

.generation-params {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.9;
  margin-bottom: 12px;
}

/* 提示词区域 */
.generation-prompt {
  margin-top: 8px;
  display: inline-block;
  max-width: 100%;
}

.prompt-label {
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 4px;
}

.prompt-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-block;
  width: auto;
  max-width: 100%;
}

/* 生成后图片展示区域 */
.generated-images-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 16px;
  border: none;
}

.generated-image-item {
  flex: 0 0 auto;
  width: 240px;
  height: 250px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.generated-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* .generated-image-item:hover {
  transform: scale(1.02);
} */

/* 状态区域 - 上传中 */
.generation-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.generation-status.failed {
  color: #ff6b6b;
}

.status-text {
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

.generation-status.failed .status-text {
  color: #ff6b6b;
}

/* 加载动画 */
.loading-dots {
  display: flex;
  gap: 4px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background: #ffffff;
  border-radius: 50%;
  animation: loading 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* 操作按钮 - 完成状态 */
.generation-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  align-items: center;
}

.generation-item .action-btn {
  background: rgba(184, 221, 255, 0.06) !important;
  border: none;
  color: rgba(224, 245, 255, 0.8);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  outline: none;
  box-shadow: none;
}

.generation-item .action-btn:focus {
  outline: none;
  box-shadow: none;
}

.generation-item .action-btn:active {
  outline: none;
  box-shadow: none;
}

.generation-item .action-btn:hover {
  color: rgba(224, 245, 255, 0.8);
  background: rgba(184, 221, 255, 0.08) !important;
}

.generation-item .action-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1) !important;
}

.generation-item .action-btn.delete-btn {
  color: rgba(224, 245, 255, 0.8) !important;
}

.generation-item .action-btn.delete-btn:hover {
  background: rgba(184, 221, 255, 0.08) !important;
  color: rgba(224, 245, 255, 0.8) !important;
}

/* 状态特定样式 */
.generation-item.uploading {
  /* 上传中状态的特定样式 */
}

.generation-item.completed {
  /* 完成状态的特定样式 */
}

/* 响应式设计 */
@media (max-width: 768px) {
  .generation-item {
    padding: 16px;
  }
  
  .generation-content {
    gap: 16px;
  }
  
  .generation-image-container {
    width: 60px;
    height: 60px;
  }
  
  .generation-actions {
    flex-direction: column;
    gap: 8px;
  }
  
  .action-btn {
    width: 100%;
    justify-content: center;
  }
  
  .prompt-text {
    font-size: 13px;
    padding: 6px 10px;
  }
}
